package com.example.communitypro.mapper;

import com.example.communitypro.pojo.Message;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MessageDao {
    List<Message> getMessageByListId(int listId);

    int insertMessage(Message message);

    int updateMessage(Message message);

    int deleteMessage(int messageId);

    int setMessageReadByList(int listId);

    List<Message> getMessageBySender(@Param("sender")Integer sender);

    List<Message> getMessageBySenderAndReceiver(@Param("sender") Integer sender, @Param("receiver")Integer receiver, @Param("amount")int amount);
}
